-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netkvm: use WinDump for capture and Wireshark for analysis #4097
base: master
Are you sure you want to change the base?
Conversation
Test Result:
|
Hi @leidwang and @yanglei-rh, Could you guys help me review this patch when you are free? Thanks in advance. |
Please re-write the test steps, the whole process is not installed |
Hi @yanglei-rh, Thanks for your advice. I will provide the whole test cases which include unattended_install and the case that I want to test.
For this patch, I have installed the |
x86_64: | ||
wireshark_name = "Wireshark-win64-1.10.1.exe" | ||
i386, i686: | ||
wireshark_name = "Wireshark-win32-1.10.1.exe" | ||
install_wireshark_cmd = "xcopy WIN_UTILS:\${wireshark_name} c:\ /y && c:\${wireshark_name} /S" | ||
installation_cmd = "xcopy WIN_UTILS:\${WinDump_name} c:\ /y && xcopy WIN_UTILS:\${wireshark_name} c:\ /y && c:\${wireshark_name} /S" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems this cmd will copy windump and wireshark to C and then install wireshark, is this expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the title of this PR says: "Netkvm: Replace tshark.exe with WinDump.exe".
Why does your code still install wireshark but not windump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the end of this case, we still need to analyze the packet's result with Wireshark only. However, we have used Windump to capture NetFlow data since Wireshark has a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the WinDump part, WinDump.exe is a portable software that does not need to be installed.
Thank @leidwang and let me think about the patch title again : )
But what confuses me is that it always failed with " avocado.core.exceptions.TestError: Failed to parse session log file, status=9009, output='"C:\Program Files\Wireshark\tshark.exe"' is not recognized as an internal or external command," on my side, why you can test pass? Could you please try to test it again with other guest? Such as Win11 or Win2025, or both two. |
Thanks, guys. Let me do more tests. |
Hi @heywji Please mark this PR as draft status if it is not ready to review,thanks. |
a64cc14
to
a1850ec
Compare
1901e8d
to
857bfcd
Compare
857bfcd
to
9d784a3
Compare
9d784a3
to
e7fce8b
Compare
Hi @yanglei-rh @leidwang, Could you guys help review it again since everything works well now? Test result:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @vivianQizhu, Could you help review this as well? Thanks : ) |
e7fce8b
to
791578d
Compare
5d22a50
to
e7ec1d1
Compare
Test result:
|
qemu/tests/enable_scatter_windows.py
Outdated
error_context.context("Check if WinDump is installed", test.log.info) | ||
check_result = session.cmd_output(check_windump_installed_cmd) | ||
if windump_name not in check_result: | ||
error_context.context("Install WinDump", test.log.info) | ||
windump_install_cmd = utils_misc.set_winutils_letter( | ||
session, windump_install_cmd | ||
) | ||
status, output = session.cmd_status_output(windump_install_cmd, timeout=timeout) | ||
if status != 0: | ||
test.error( | ||
"Failed to install WinDump, status=%s, output=%s" % (status, output) | ||
) | ||
else: | ||
test.log.info("WinDump is already installed") | ||
|
||
error_context.context("Check if wireshark is installed", test.log.info) | ||
check_installed_cmd = params.get("check_installed_cmd") | ||
check_result = session.cmd_output(check_installed_cmd) | ||
check_wireshark_installed_cmd = params.get("check_wireshark_installed_cmd") | ||
check_result = session.cmd_output(check_wireshark_installed_cmd) | ||
if "tshark" not in check_result: | ||
error_context.context("Install wireshark", test.log.info) | ||
install_wireshark_cmd = params.get("install_wireshark_cmd") | ||
install_wireshark_cmd = utils_misc.set_winutils_letter( | ||
session, install_wireshark_cmd | ||
wireshark_installation_cmd = params.get("wireshark_installation_cmd") | ||
wireshark_installation_cmd = utils_misc.set_winutils_letter( | ||
session, wireshark_installation_cmd | ||
) | ||
status, output = session.cmd_status_output( | ||
install_wireshark_cmd, timeout=timeout | ||
wireshark_installation_cmd, timeout=timeout | ||
) | ||
if status: | ||
test.error( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try to implement them into a for loop? e.g. for tool_name in ("windump", "wireshark") or it could be a dict as you might want to name a different prefix instead of the tool name itself.
399d4d3
to
03af606
Compare
3f7652b
to
cb94ac9
Compare
Test Result:
|
@heywji please re-install a image and clone this patch to test again to verify you patch is correct, since there are include install steps. |
Replace tshark.exe with WinDump.exe for capturing network traffic. This resolves the issue where enabling netkvm driver TxLSO results in no packet length >= 1514 after file transfer, identified as a Wireshark problem. Signed-off-by: wji <[email protected]>
cb94ac9
to
fc47175
Compare
Replace tshark.exe with WinDump.exe for capturing network traffic. This resolves the issue where enabling netkvm driver TxLSO results in no packet length >= 1514 after file transfer, identified as a Wireshark problem.
ID: 2395
Signed-off-by: wji [email protected]